<%@page import="com.neuedu.entity.Emp"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" import="com.neuedu.dto.*,java.util.*"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style type="text/css">
	table{
		border: solid 1px #666;
		border-collapse: collapse;
		width: 700px;
	}
	
	tr,td,th{
				border: solid 1px #666;
				text-align: center;
	}
	div{
		margin-top:20px;
		width: 700px;
		text-align: center;
	}
	a{
		text-decoration: none;
	}
</style>


</head>
<body>
<table>
	<tr>
		<th>empno</th>
		<th>ename</th>
		<th>job</th>
		<th>mgr</th>
		<th>hiredate</th>
		<th>sal</th>
		<th>comm</th>
		<th>deptno</th>
	</tr>
	<%
		PageDto dto = (PageDto)session.getAttribute("dto");
		List<Emp> list = dto.getList();
		for(int i=0;i<list.size();i++){
			Emp emp = list.get(i);
	%>
	<tr>
		<td><%=emp.getEmpno() %></td>
		<td><%=emp.getEname() %></td>
		<td><%=emp.getJob() %></td>
		<td><%=emp.getMgr() %></td>
		<td><%=emp.getHiredate() %></td>
		<td><%=emp.getSal() %></td>
		<td><%=emp.getComm() %></td>
		<td><%=emp.getDeptno() %></td>
	</tr>
	<%} %>
</table>
<div>
	<a href="FenYeServlet?pageNum=1">首页</a> 
	<a href="FenYeServlet?pageNum=<%=dto.getPreNum() %>">上一页</a>
	<a href="FenYeServlet?pageNum=<%=dto.getNextNum() %>">下一页</a>
	<a href="FenYeServlet?pageNum=<%=dto.getTotalPage() %>">末页</a>
</div>

</body>
</html>